package com.surelution.core.drivers;

import java.util.Properties;

public class DriverFactory {

	public static Connection buildConnection(String className, Properties prop) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
		@SuppressWarnings("rawtypes")
		Class clazz = Class.forName(className);
		Connection conn = (Connection) clazz.newInstance();
		conn.setProperties(prop);
		return conn;
	}
}
